<?php

class Admin_Bootstrap extends Zend_Application_Module_Bootstrap {

	public function _initPlugins() {
		$front = Zend_Controller_Front::getInstance ();
		if(Zend_Registry::get('cnf')->installed==true){
			$front->registerPlugin ( new Zen_Controller_Plugin_Auth());
			$front->registerPlugin ( new Admin_Plugin_Bar () );
		}
		$router = $front->getRouter ();
		$router->addRoute('backend', new Zend_Controller_Router_Route('backend/:module/:controller/:action/*', array('controller'=>'index','action'=>'index'),array()));
		$router->addRoute('admin', new Zend_Controller_Router_Route_Static('admin',
			array(
		 		'module' => 'admin',
		 		'controller' => 'index' ,
		 		'action' => 'index'
	 		),
	 		array(
	  			'module'     => 'admin',
	  			'controller' => 'index',
	  			'action'     => 'index'
  			)));

	}
}
